/*************************************************************************
> File Name: 2.c
> Author: hzy
> Created Time: 2023-07-24 15:30:40
> Description: 2、用指针给一个数组赋值，并打印。（指针）
************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char const *argv[])
{
    int arr[10] = {0};
    int *p = arr;

    for (int i = 0; i < 10; i++)
    {
        scanf("%d", p + i);
    }
    printf("该数组的值为：\n");
    for (int j = 0; j < 10; j++)
    {
        printf("%d", *(p + j));
    }
    printf("\n");

    return 0;
}